\(\int \frac {a B+b B \cos (c+d x)}{a+b \cos (c+d x)} \, dx\) [284]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F(-2)]
   Giac [C] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 3 \[ \int \frac {a B+b B \cos (c+d x)}{a+b \cos (c+d x)} \, dx=B x \]

[Out]

B*x

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 3, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {21, 8} \[ \int \frac {a B+b B \cos (c+d x)}{a+b \cos (c+d x)} \, dx=B x \]

[In]

Int[(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]),x]

[Out]

B*x

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rubi steps \begin{align*} \text {integral}& = B \int 1 \, dx \\ & = B x \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 3, normalized size of antiderivative = 1.00 \[ \int \frac {a B+b B \cos (c+d x)}{a+b \cos (c+d x)} \, dx=B x \]

[In]

Integrate[(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]),x]

[Out]

B*x

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.33

method result size
default \(x B\) \(4\)
risch \(x B\) \(4\)
derivativedivides \(\frac {B \left (d x +c \right )}{d}\) \(11\)
norman \(\frac {x B +x B \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\) \(35\)

[In]

int((B*a+b*B*cos(d*x+c))/(a+cos(d*x+c)*b),x,method=_RETURNVERBOSE)

[Out]

x*B

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 3, normalized size of antiderivative = 1.00 \[ \int \frac {a B+b B \cos (c+d x)}{a+b \cos (c+d x)} \, dx=B x \]

[In]

integrate((a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x, algorithm="fricas")

[Out]

B*x

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 2, normalized size of antiderivative = 0.67 \[ \int \frac {a B+b B \cos (c+d x)}{a+b \cos (c+d x)} \, dx=B x \]

[In]

integrate((a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x)

[Out]

B*x

Maxima [F(-2)]

Exception generated. \[ \int \frac {a B+b B \cos (c+d x)}{a+b \cos (c+d x)} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more de

Giac [C] (verification not implemented)

Result contains higher order function than in optimal. Order 3 vs. order 1.

Time = 0.27 (sec) , antiderivative size = 10, normalized size of antiderivative = 3.33 \[ \int \frac {a B+b B \cos (c+d x)}{a+b \cos (c+d x)} \, dx=\frac {{\left (d x + c\right )} B}{d} \]

[In]

integrate((a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x, algorithm="giac")

[Out]

(d*x + c)*B/d

Mupad [B] (verification not implemented)

Time = 0.52 (sec) , antiderivative size = 3, normalized size of antiderivative = 1.00 \[ \int \frac {a B+b B \cos (c+d x)}{a+b \cos (c+d x)} \, dx=B\,x \]

[In]

int((B*a + B*b*cos(c + d*x))/(a + b*cos(c + d*x)),x)

[Out]

B*x